package com.summer.jni;

public class JniTest {
	public static void main(String[] args) {
		HelloWorld h = new HelloWorld(); 
		h.displayHelloWorld();
		System.out.println("add:3++ ="+h.add(3));
		System.out.println("add:2+3="+h.add(3,2));
		System.out.println("sum:"+h.sum(3,6));
		
		
		int[] a={1,2,3,4,5};
		int b=1;
		long time = System.currentTimeMillis();
		for(int index=0;index<=100000000;index++){
			b=1;
			for(int i=0;i<a.length;i++){
				b= a[i]*b;
			}
		}
		time = System.currentTimeMillis()-time;
		System.out.println("time:"+time+"  b:"+b);
		
		
		time = System.currentTimeMillis();
		b = h.f(a);
		time = System.currentTimeMillis()-time;
		System.out.println("time:"+time+"  b:"+b);
	}
}
